package demo1;
class claculate{
    public static int add(int a,int b){
        return a + b;
    }
    public static double add(double a,double b){
        return a+b;
    }
}
class B {
    public B() {
// do nothing
        func();
    }
    public void func() {
        System.out.println("B.func()");
    }
}
class D extends B {
    private int num = 1;
    @Override
    public void func() {
        System.out.println("D.func() " + num);
    }
}



public class Test {
    public static void main(String[] args) {
        D d = new D();
    }



    public static void main2(String[] args) {
        Student student = new Student();
        student.sleep();
        System.out.println("==================");
        Person person = new Person();
        person.sleep();
    }



    public static void main1(String[] args) {
        int ret1 = claculate.add(10,30);
        double ret2 = claculate.add(1.5,2.5);
        System.out.println(ret1);
        System.out.println(ret2);
    }
}
